package tech.aistar.clothesspringboot.mapper;

import org.apache.ibatis.annotations.Insert;
import tech.aistar.clothesspringboot.pojo.result.ResultReturn;
import tech.aistar.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

import java.util.List;

@Mapper
public interface UserMapper {
    //根据用户名查询用户信息
     @Select("select * from user where username=#{username}")
    User selectByUsername(String username);
     //添加用户
    @Insert("insert into user(username,password,real_name,phone,id_card,role,status,create_time) " +
            "values(#{username},#{password},#{realName},#{phone},#{idCard},#{role},#{status},#{createTime})")
    int insertUser(User user);


}
